<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Iterators and Ranges</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../odeint_in_detail.html" title="odeint in detail">
<link rel="prev" href="integrate_functions.html" title="Integrate functions">
<link rel="next" href="state_types__algebras_and_operations.html" title="State types, algebras and operations">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../logo.jpg"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="integrate_functions.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="state_types__algebras_and_operations.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.odeint_in_detail.iterators_and_ranges"></a><a class="link" href="iterators_and_ranges.html" title="Iterators and Ranges">Iterators
      and Ranges</a>
</h3></div></div></div>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="iterators_and_ranges.html#boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.examples">Examples</a></span></dt>
<dt><span class="section"><a href="iterators_and_ranges.html#boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.const_step_iterator">const_step_iterator</a></span></dt>
<dt><span class="section"><a href="iterators_and_ranges.html#boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.const_step_time_iterator">const_step_time_iterator</a></span></dt>
<dt><span class="section"><a href="iterators_and_ranges.html#boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.adaptive_step_iterator">adaptive_step_iterator</a></span></dt>
<dt><span class="section"><a href="iterators_and_ranges.html#boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.adaptive_step_time_iterator">adaptive_step_time_iterator</a></span></dt>
<dt><span class="section"><a href="iterators_and_ranges.html#boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.n_step_iterator">n_step_iterator</a></span></dt>
<dt><span class="section"><a href="iterators_and_ranges.html#boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.n_step_time_iterator">n_step_time_iterator</a></span></dt>
<dt><span class="section"><a href="iterators_and_ranges.html#boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.times_iterator">times_iterator</a></span></dt>
<dt><span class="section"><a href="iterators_and_ranges.html#boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.times_time_iterator">times_time_iterator</a></span></dt>
</dl></div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.examples"></a><a class="link" href="iterators_and_ranges.html#boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.examples" title="Examples">Examples</a>
</h4></div></div></div>
<p>
          odeint supports iterators that iterate along an approximate solution of
          an ordinary differential equation. Iterators offer you an alternative to
          the integrate functions. Furthermore, many of the standard algorithms in
          the C++ standard library and Boost.Range can be used with the odeint's
          iterators.
        </p>
<p>
          Several iterator types are provided, in consistence with the <a class="link" href="integrate_functions.html" title="Integrate functions">integrate
          functions</a>. Hence there are <code class="computeroutput"><span class="identifier">const_step_iterator</span></code>,
          <code class="computeroutput"><span class="identifier">adaptive_step_iterator</span></code>,
          <code class="computeroutput"><span class="identifier">n_step_iterator</span></code> and <code class="computeroutput"><span class="identifier">times_iterator</span></code> -- each of them in two
          versions: either with only the <code class="computeroutput"><span class="identifier">state</span></code>
          or with a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">state</span><span class="special">,</span><span class="identifier">time</span><span class="special">&gt;</span></code>
          as value type. They are all single pass iterators. In the following, we
          show a few examples of how to use those iterators together with std algorithms.
        </p>
<p>
</p>
<pre class="programlisting"><span class="identifier">runge_kutta4</span><span class="special">&lt;</span> <span class="identifier">state_type</span> <span class="special">&gt;</span> <span class="identifier">stepper</span><span class="special">;</span>
<span class="identifier">state_type</span> <span class="identifier">x</span> <span class="special">=</span> <span class="special">{{</span> <span class="number">10.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">}};</span>
<span class="keyword">double</span> <span class="identifier">res</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">accumulate</span><span class="special">(</span> <span class="identifier">make_const_step_iterator_begin</span><span class="special">(</span> <span class="identifier">stepper</span> <span class="special">,</span> <span class="identifier">lorenz</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">1.0</span> <span class="special">,</span> <span class="number">0.01</span> <span class="special">)</span> <span class="special">,</span>
                              <span class="identifier">make_const_step_iterator_end</span><span class="special">(</span> <span class="identifier">stepper</span> <span class="special">,</span> <span class="identifier">lorenz</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">)</span> <span class="special">,</span>
                              <span class="number">0.0</span> <span class="special">,</span>
                              <span class="special">[](</span> <span class="keyword">double</span> <span class="identifier">sum</span> <span class="special">,</span> <span class="keyword">const</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">)</span> <span class="special">{</span>
                                  <span class="keyword">return</span> <span class="identifier">sum</span> <span class="special">+</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">];</span> <span class="special">}</span> <span class="special">);</span>
<span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">res</span> <span class="special">&lt;&lt;</span> <span class="identifier">endl</span><span class="special">;</span>
</pre>
<p>
        </p>
<p>
          In this example all x-values of the solution are accumulated. Note, how
          dereferencing the iterator gives the current state <code class="computeroutput"><span class="identifier">x</span></code>
          of the ODE (the second argument of the accumulate lambda). The iterator
          itself does not occur directly in this example but it is generated by the
          factory functions <code class="computeroutput"><span class="identifier">make_const_step_iterator_begin</span></code>
          and <code class="computeroutput"><span class="identifier">make_const_step_iterator_end</span></code>.
          odeint also supports Boost.Range, that allows to write the above example
          in a more compact form with the factory function <code class="computeroutput"><span class="identifier">make_const_step_range</span></code>,
          but now using <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">accumulate</span></code> from __bost_range:
        </p>
<p>
</p>
<pre class="programlisting"><span class="identifier">runge_kutta4</span><span class="special">&lt;</span> <span class="identifier">state_type</span> <span class="special">&gt;</span> <span class="identifier">stepper</span><span class="special">;</span>
<span class="identifier">state_type</span> <span class="identifier">x</span> <span class="special">=</span> <span class="special">{{</span> <span class="number">10.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">}};</span>
<span class="keyword">double</span> <span class="identifier">res</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">accumulate</span><span class="special">(</span> <span class="identifier">make_const_step_range</span><span class="special">(</span> <span class="identifier">stepper</span> <span class="special">,</span> <span class="identifier">lorenz</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">1.0</span> <span class="special">,</span> <span class="number">0.01</span> <span class="special">)</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span>
                                <span class="special">[](</span> <span class="keyword">double</span> <span class="identifier">sum</span> <span class="special">,</span> <span class="keyword">const</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">)</span> <span class="special">{</span>
                                    <span class="keyword">return</span> <span class="identifier">sum</span> <span class="special">+</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">];</span> <span class="special">}</span> <span class="special">);</span>
<span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">res</span> <span class="special">&lt;&lt;</span> <span class="identifier">endl</span><span class="special">;</span>
</pre>
<p>
        </p>
<p>
          The second iterator type is also a iterator with const step size. But the
          value type of this iterator consists here of a pair of the time and the
          state of the solution of the ODE. An example is
        </p>
<p>
</p>
<pre class="programlisting"><span class="identifier">runge_kutta4</span><span class="special">&lt;</span> <span class="identifier">state_type</span> <span class="special">&gt;</span> <span class="identifier">stepper</span><span class="special">;</span>
<span class="identifier">state_type</span> <span class="identifier">x</span> <span class="special">=</span> <span class="special">{{</span> <span class="number">10.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">}};</span>
<span class="keyword">double</span> <span class="identifier">res</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">accumulate</span><span class="special">(</span> <span class="identifier">make_const_step_time_range</span><span class="special">(</span> <span class="identifier">stepper</span> <span class="special">,</span> <span class="identifier">lorenz</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">1.0</span> <span class="special">,</span> <span class="number">0.01</span> <span class="special">)</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span>
                                <span class="special">[](</span> <span class="keyword">double</span> <span class="identifier">sum</span> <span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span> <span class="keyword">const</span> <span class="identifier">state_type</span> <span class="special">&amp;,</span> <span class="keyword">double</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">)</span> <span class="special">{</span>
                                    <span class="keyword">return</span> <span class="identifier">sum</span> <span class="special">+</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">first</span><span class="special">[</span><span class="number">0</span><span class="special">];</span> <span class="special">}</span> <span class="special">);</span>
<span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">res</span> <span class="special">&lt;&lt;</span> <span class="identifier">endl</span><span class="special">;</span>
</pre>
<p>
        </p>
<p>
          The factory functions are now <code class="computeroutput"><span class="identifier">make_const_step_time_iterator_begin</span></code>,
          <code class="computeroutput"><span class="identifier">make_const_step_time_iterator_end</span></code>
          and <code class="computeroutput"><span class="identifier">make_const_step_time_range</span></code>.
          Note, how the lambda now expects a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>
          as this is the value type of the <code class="computeroutput"><span class="identifier">const_step_time_iterator</span></code>'s.
        </p>
<p>
          Next, we discuss the adaptive iterators which are completely analogous
          to the const step iterators, but are based on adaptive stepper routines
          and thus adjust the step size during the iteration. Examples are
        </p>
<p>
</p>
<pre class="programlisting"><span class="keyword">auto</span> <span class="identifier">stepper</span> <span class="special">=</span> <span class="identifier">make_controlled</span><span class="special">(</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="identifier">runge_kutta_cash_karp54</span><span class="special">&lt;</span> <span class="identifier">state_type</span> <span class="special">&gt;()</span> <span class="special">);</span>
<span class="identifier">state_type</span> <span class="identifier">x</span> <span class="special">=</span> <span class="special">{{</span> <span class="number">10.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">}};</span>
<span class="keyword">double</span> <span class="identifier">res</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">accumulate</span><span class="special">(</span> <span class="identifier">make_adaptive_range</span><span class="special">(</span> <span class="identifier">stepper</span> <span class="special">,</span> <span class="identifier">lorenz</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">1.0</span> <span class="special">,</span> <span class="number">0.01</span> <span class="special">)</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span>
                                <span class="special">[](</span> <span class="keyword">double</span> <span class="identifier">sum</span> <span class="special">,</span> <span class="keyword">const</span> <span class="identifier">state_type</span><span class="special">&amp;</span> <span class="identifier">x</span> <span class="special">)</span> <span class="special">{</span>
                                    <span class="keyword">return</span> <span class="identifier">sum</span> <span class="special">+</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">];</span> <span class="special">}</span> <span class="special">);</span>
<span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">res</span> <span class="special">&lt;&lt;</span> <span class="identifier">endl</span><span class="special">;</span>
</pre>
<p>
        </p>
<p>
</p>
<pre class="programlisting"><span class="keyword">auto</span> <span class="identifier">stepper</span> <span class="special">=</span> <span class="identifier">make_controlled</span><span class="special">(</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="identifier">runge_kutta_cash_karp54</span><span class="special">&lt;</span> <span class="identifier">state_type</span> <span class="special">&gt;()</span> <span class="special">);</span>
<span class="identifier">state_type</span> <span class="identifier">x</span> <span class="special">=</span> <span class="special">{{</span> <span class="number">10.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">}};</span>
<span class="keyword">double</span> <span class="identifier">res</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">accumulate</span><span class="special">(</span> <span class="identifier">make_adaptive_time_range</span><span class="special">(</span> <span class="identifier">stepper</span> <span class="special">,</span> <span class="identifier">lorenz</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">1.0</span> <span class="special">,</span> <span class="number">0.01</span> <span class="special">)</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span>
                                <span class="special">[](</span> <span class="keyword">double</span> <span class="identifier">sum</span> <span class="special">,</span> <span class="keyword">const</span> <span class="identifier">pair</span><span class="special">&lt;</span> <span class="keyword">const</span> <span class="identifier">state_type</span><span class="special">&amp;</span> <span class="special">,</span> <span class="keyword">double</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">)</span> <span class="special">{</span>
                                    <span class="keyword">return</span> <span class="identifier">sum</span> <span class="special">+</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">first</span><span class="special">[</span><span class="number">0</span><span class="special">];</span> <span class="special">}</span> <span class="special">);</span>
<span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">res</span> <span class="special">&lt;&lt;</span> <span class="identifier">endl</span><span class="special">;</span>
</pre>
<p>
        </p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
            'adaptive_iterator<code class="computeroutput"> <span class="keyword">and</span> </code>adaptive_time_iterator'
            can only be used with <a class="link" href="../concepts/controlled_stepper.html" title="Controlled Stepper">Controlled
            Stepper</a> or <a class="link" href="../concepts/dense_output_stepper.html" title="Dense Output Stepper">Dense
            Output Stepper</a>.
          </p></td></tr>
</table></div>
<p>
          In general one can say that iterating over a range of a <code class="computeroutput"><span class="identifier">const_step_iterator</span></code>
          behaves like an <code class="computeroutput"><span class="identifier">integrate_const</span></code>
          function call, and similarly for <code class="computeroutput"><span class="identifier">adaptive_iterator</span></code>
          and <code class="computeroutput"><span class="identifier">integrate_adaptive</span></code>,
          <code class="computeroutput"><span class="identifier">n_step_iterator</span></code> and <code class="computeroutput"><span class="identifier">integrate_n_steps</span></code>, and finally <code class="computeroutput"><span class="identifier">times_iterator</span></code> and <code class="computeroutput"><span class="identifier">integrate_times</span></code>.
        </p>
<p>
          Below we list the most important properties of the exisiting iterators:
        </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.const_step_iterator"></a><a class="link" href="iterators_and_ranges.html#boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.const_step_iterator" title="const_step_iterator">const_step_iterator</a>
</h4></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
              Definition: <code class="computeroutput"><span class="identifier">const_step_iterator</span><span class="special">&lt;</span> <span class="identifier">Stepper</span>
              <span class="special">,</span> <span class="identifier">System</span>
              <span class="special">,</span> <span class="identifier">State</span>
              <span class="special">&gt;</span></code>
            </li>
<li class="listitem">
              <code class="computeroutput"><span class="identifier">value_type</span></code> is <code class="computeroutput"><span class="identifier">State</span></code>
            </li>
<li class="listitem">
              <code class="computeroutput"><span class="identifier">reference_type</span></code> is
              <code class="computeroutput"><span class="identifier">State</span> <span class="keyword">const</span><span class="special">&amp;</span></code>
            </li>
<li class="listitem">
              Factory functions
              <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_const_step_iterator_begin</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">,</span> <span class="identifier">t_start</span>
                    <span class="special">,</span> <span class="identifier">t_end</span>
                    <span class="special">,</span> <span class="identifier">dt</span>
                    <span class="special">)</span></code>
                  </li>
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_const_step_iterator_end</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">)</span></code>
                  </li>
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_const_step_range</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">,</span> <span class="identifier">t_start</span>
                    <span class="special">,</span> <span class="identifier">t_end</span>
                    <span class="special">,</span> <span class="identifier">dt</span>
                    <span class="special">)</span></code>
                  </li>
</ul></div>
            </li>
<li class="listitem">
              This stepper works with all steppers fulfilling the Stepper concept
              or the DenseOutputStepper concept.
            </li>
<li class="listitem">
              The value of <code class="computeroutput"><span class="identifier">state</span></code>
              is the current state of the ODE during the iteration.
            </li>
</ul></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.const_step_time_iterator"></a><a class="link" href="iterators_and_ranges.html#boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.const_step_time_iterator" title="const_step_time_iterator">const_step_time_iterator</a>
</h4></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
              Definition: <code class="computeroutput"><span class="identifier">const_step_time_iterator</span><span class="special">&lt;</span> <span class="identifier">Stepper</span>
              <span class="special">,</span> <span class="identifier">System</span>
              <span class="special">,</span> <span class="identifier">State</span>
              <span class="special">&gt;</span></code>
            </li>
<li class="listitem">
              <code class="computeroutput"><span class="identifier">value_type</span></code> is <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span>
              <span class="identifier">State</span> <span class="special">,</span>
              <span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">time_type</span> <span class="special">&gt;</span></code>
            </li>
<li class="listitem">
              <code class="computeroutput"><span class="identifier">reference_type</span></code> is
              <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span>
              <span class="identifier">State</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">,</span> <span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">time_type</span> <span class="special">&gt;</span>
              <span class="keyword">const</span><span class="special">&amp;</span></code>
            </li>
<li class="listitem">
              Factory functions
              <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_const_step_time_iterator_begin</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">,</span> <span class="identifier">t_start</span>
                    <span class="special">,</span> <span class="identifier">t_end</span>
                    <span class="special">,</span> <span class="identifier">dt</span>
                    <span class="special">)</span></code>
                  </li>
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_const_step_time_iterator_end</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">)</span></code>
                  </li>
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_const_step_time_range</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">,</span> <span class="identifier">t_start</span>
                    <span class="special">,</span> <span class="identifier">t_end</span>
                    <span class="special">,</span> <span class="identifier">dt</span>
                    <span class="special">)</span></code>
                  </li>
</ul></div>
            </li>
<li class="listitem">
              This stepper works with all steppers fulfilling the Stepper concept
              or the DenseOutputStepper concept.
            </li>
<li class="listitem">
              This stepper updates the value of <code class="computeroutput"><span class="identifier">state</span></code>.
              The value of <code class="computeroutput"><span class="identifier">state</span></code>
              is the current state of the ODE during the iteration.
            </li>
</ul></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.adaptive_step_iterator"></a><a class="link" href="iterators_and_ranges.html#boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.adaptive_step_iterator" title="adaptive_step_iterator">adaptive_step_iterator</a>
</h4></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
              Definition: <code class="computeroutput"><span class="identifier">adaptive_iterator</span><span class="special">&lt;</span> <span class="identifier">Stepper</span>
              <span class="special">,</span> <span class="identifier">System</span>
              <span class="special">,</span> <span class="identifier">State</span>
              <span class="special">&gt;</span></code>
            </li>
<li class="listitem">
              <code class="computeroutput"><span class="identifier">value_type</span></code> is <code class="computeroutput"><span class="identifier">State</span></code>
            </li>
<li class="listitem">
              <code class="computeroutput"><span class="identifier">reference_type</span></code> is
              <code class="computeroutput"><span class="identifier">State</span> <span class="keyword">const</span><span class="special">&amp;</span></code>
            </li>
<li class="listitem">
              Factory functions
              <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_adaptive_iterator_begin</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">,</span> <span class="identifier">t_start</span>
                    <span class="special">,</span> <span class="identifier">t_end</span>
                    <span class="special">,</span> <span class="identifier">dt</span>
                    <span class="special">)</span></code>
                  </li>
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_adaptive_iterator_end</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">)</span></code>
                  </li>
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_adaptive_range</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">,</span> <span class="identifier">t_start</span>
                    <span class="special">,</span> <span class="identifier">t_end</span>
                    <span class="special">,</span> <span class="identifier">dt</span>
                    <span class="special">)</span></code>
                  </li>
</ul></div>
            </li>
<li class="listitem">
              This stepper works with all steppers fulfilling the ControlledStepper
              concept or the DenseOutputStepper concept.
            </li>
<li class="listitem">
              For steppers fulfilling the ControlledStepper concept <code class="computeroutput"><span class="identifier">state</span></code> is modified according to the
              current state of the ODE. For DenseOutputStepper the state is not modified
              due to performance optimizations, but the steppers itself.
            </li>
</ul></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.adaptive_step_time_iterator"></a><a class="link" href="iterators_and_ranges.html#boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.adaptive_step_time_iterator" title="adaptive_step_time_iterator">adaptive_step_time_iterator</a>
</h4></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
              Definition: <code class="computeroutput"><span class="identifier">adaptive_iterator</span><span class="special">&lt;</span> <span class="identifier">Stepper</span>
              <span class="special">,</span> <span class="identifier">System</span>
              <span class="special">,</span> <span class="identifier">State</span>
              <span class="special">&gt;</span></code>
            </li>
<li class="listitem">
              <code class="computeroutput"><span class="identifier">value_type</span></code> is <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span>
              <span class="identifier">State</span> <span class="special">,</span>
              <span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">time_type</span> <span class="special">&gt;</span></code>
            </li>
<li class="listitem">
              <code class="computeroutput"><span class="identifier">reference_type</span></code> is
              <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span>
              <span class="identifier">State</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">,</span> <span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">time_type</span> <span class="special">&gt;</span>
              <span class="keyword">const</span><span class="special">&amp;</span></code>
            </li>
<li class="listitem">
              Factory functions
              <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_adaptive_time_iterator_begin</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">,</span> <span class="identifier">t_start</span>
                    <span class="special">,</span> <span class="identifier">t_end</span>
                    <span class="special">,</span> <span class="identifier">dt</span>
                    <span class="special">)</span></code>
                  </li>
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_adaptive_time_iterator_end</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">)</span></code>
                  </li>
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_adaptive_time_range</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">,</span> <span class="identifier">t_start</span>
                    <span class="special">,</span> <span class="identifier">t_end</span>
                    <span class="special">,</span> <span class="identifier">dt</span>
                    <span class="special">)</span></code>
                  </li>
</ul></div>
            </li>
<li class="listitem">
              This stepper works with all steppers fulfilling the ControlledStepper
              concept or the DenseOutputStepper concept.
            </li>
<li class="listitem">
              For steppers fulfilling the ControlledStepper concept <code class="computeroutput"><span class="identifier">state</span></code> is modified according to the
              current state of the ODE. For DenseOutputStepper the state is not modified
              due to performance optimizations, but the stepper itself.
            </li>
</ul></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.n_step_iterator"></a><a class="link" href="iterators_and_ranges.html#boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.n_step_iterator" title="n_step_iterator">n_step_iterator</a>
</h4></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
              Definition: <code class="computeroutput"><span class="identifier">n_step_iterator</span><span class="special">&lt;</span> <span class="identifier">Stepper</span>
              <span class="special">,</span> <span class="identifier">System</span>
              <span class="special">,</span> <span class="identifier">State</span>
              <span class="special">&gt;</span></code>
            </li>
<li class="listitem">
              <code class="computeroutput"><span class="identifier">value_type</span></code> is <code class="computeroutput"><span class="identifier">State</span></code>
            </li>
<li class="listitem">
              <code class="computeroutput"><span class="identifier">reference_type</span></code> is
              <code class="computeroutput"><span class="identifier">State</span> <span class="keyword">const</span><span class="special">&amp;</span></code>
            </li>
<li class="listitem">
              Factory functions
              <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_n_step_iterator_begin</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">,</span> <span class="identifier">t_start</span>
                    <span class="special">,</span> <span class="identifier">dt</span>
                    <span class="special">,</span> <span class="identifier">num_of_steps</span>
                    <span class="special">)</span></code>
                  </li>
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_n_step_iterator_end</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">)</span></code>
                  </li>
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_n_step_range</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">,</span> <span class="identifier">t_start</span>
                    <span class="special">,</span> <span class="identifier">dt</span>
                    <span class="special">,</span> <span class="identifier">num_of_steps</span>
                    <span class="special">)</span></code>
                  </li>
</ul></div>
            </li>
<li class="listitem">
              This stepper works with all steppers fulfilling the Stepper concept
              or the DenseOutputStepper concept.
            </li>
<li class="listitem">
              The value of <code class="computeroutput"><span class="identifier">state</span></code>
              is the current state of the ODE during the iteration.
            </li>
</ul></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.n_step_time_iterator"></a><a class="link" href="iterators_and_ranges.html#boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.n_step_time_iterator" title="n_step_time_iterator">n_step_time_iterator</a>
</h4></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
              Definition: <code class="computeroutput"><span class="identifier">n_step_time_iterator</span><span class="special">&lt;</span> <span class="identifier">Stepper</span>
              <span class="special">,</span> <span class="identifier">System</span>
              <span class="special">,</span> <span class="identifier">State</span>
              <span class="special">&gt;</span></code>
            </li>
<li class="listitem">
              <code class="computeroutput"><span class="identifier">value_type</span></code> is <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span>
              <span class="identifier">State</span> <span class="special">,</span>
              <span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">time_type</span> <span class="special">&gt;</span></code>
            </li>
<li class="listitem">
              <code class="computeroutput"><span class="identifier">reference_type</span></code> is
              <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span>
              <span class="identifier">State</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">,</span> <span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">time_type</span> <span class="special">&gt;</span>
              <span class="keyword">const</span><span class="special">&amp;</span></code>
            </li>
<li class="listitem">
              Factory functions
              <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_n_step_time_iterator_begin</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">,</span> <span class="identifier">t_start</span>
                    <span class="special">,</span> <span class="identifier">dt</span>
                    <span class="special">,</span> <span class="identifier">num_of_steps</span>
                    <span class="special">)</span></code>
                  </li>
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_n_step_time_iterator_end</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">)</span></code>
                  </li>
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_n_step_time_range</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">,</span> <span class="identifier">t_start</span>
                    <span class="special">,</span> <span class="identifier">dt</span>
                    <span class="special">,</span> <span class="identifier">num_of_steps</span>
                    <span class="special">)</span></code>
                  </li>
</ul></div>
            </li>
<li class="listitem">
              This stepper works with all steppers fulfilling the Stepper concept
              or the DenseOutputStepper concept.
            </li>
<li class="listitem">
              This stepper updates the value of <code class="computeroutput"><span class="identifier">state</span></code>.
              The value of <code class="computeroutput"><span class="identifier">state</span></code>
              is the current state of the ODE during the iteration.
            </li>
</ul></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.times_iterator"></a><a class="link" href="iterators_and_ranges.html#boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.times_iterator" title="times_iterator">times_iterator</a>
</h4></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
              Definition: <code class="computeroutput"><span class="identifier">times_iterator</span><span class="special">&lt;</span> <span class="identifier">Stepper</span>
              <span class="special">,</span> <span class="identifier">System</span>
              <span class="special">,</span> <span class="identifier">State</span>
              <span class="special">,</span> <span class="identifier">TimeIterator</span>
              <span class="special">&gt;</span></code>
            </li>
<li class="listitem">
              <code class="computeroutput"><span class="identifier">value_type</span></code> is <code class="computeroutput"><span class="identifier">State</span></code>
            </li>
<li class="listitem">
              <code class="computeroutput"><span class="identifier">reference_type</span></code> is
              <code class="computeroutput"><span class="identifier">State</span> <span class="keyword">const</span><span class="special">&amp;</span></code>
            </li>
<li class="listitem">
              Factory functions
              <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_times_iterator_begin</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">,</span> <span class="identifier">t_start</span>
                    <span class="special">,</span> <span class="identifier">t_end</span>
                    <span class="special">,</span> <span class="identifier">dt</span>
                    <span class="special">)</span></code>
                  </li>
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_times_iterator_end</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">)</span></code>
                  </li>
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_times_range</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">,</span> <span class="identifier">t_start</span>
                    <span class="special">,</span> <span class="identifier">t_end</span>
                    <span class="special">,</span> <span class="identifier">dt</span>
                    <span class="special">)</span></code>
                  </li>
</ul></div>
            </li>
<li class="listitem">
              This stepper works with all steppers fulfilling the Stepper concept,
              the ControlledStepper concept or the DenseOutputStepper concept.
            </li>
<li class="listitem">
              The value of <code class="computeroutput"><span class="identifier">state</span></code>
              is the current state of the ODE during the iteration.
            </li>
</ul></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.times_time_iterator"></a><a class="link" href="iterators_and_ranges.html#boost_numeric_odeint.odeint_in_detail.iterators_and_ranges.times_time_iterator" title="times_time_iterator">times_time_iterator</a>
</h4></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
              Definition: <code class="computeroutput"><span class="identifier">times_time_iterator</span><span class="special">&lt;</span> <span class="identifier">Stepper</span>
              <span class="special">,</span> <span class="identifier">System</span>
              <span class="special">,</span> <span class="identifier">State</span>
              <span class="special">,</span> <span class="identifier">TimeIterator</span><span class="special">&gt;</span></code>
            </li>
<li class="listitem">
              <code class="computeroutput"><span class="identifier">value_type</span></code> is <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span>
              <span class="identifier">State</span> <span class="special">,</span>
              <span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">time_type</span> <span class="special">&gt;</span></code>
            </li>
<li class="listitem">
              <code class="computeroutput"><span class="identifier">reference_type</span></code> is
              <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span>
              <span class="identifier">State</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">,</span> <span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">time_type</span> <span class="special">&gt;</span>
              <span class="keyword">const</span><span class="special">&amp;</span></code>
            </li>
<li class="listitem">
              Factory functions
              <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_times_time_iterator_begin</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">,</span> <span class="identifier">t_start</span>
                    <span class="special">,</span> <span class="identifier">t_end</span>
                    <span class="special">,</span> <span class="identifier">dt</span>
                    <span class="special">)</span></code>
                  </li>
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_times_time_step_iterator_end</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">)</span></code>
                  </li>
<li class="listitem">
                    <code class="computeroutput"><span class="identifier">make_times_time_range</span><span class="special">(</span> <span class="identifier">stepper</span>
                    <span class="special">,</span> <span class="identifier">system</span>
                    <span class="special">,</span> <span class="identifier">state</span>
                    <span class="special">,</span> <span class="identifier">t_start</span>
                    <span class="special">,</span> <span class="identifier">t_end</span>
                    <span class="special">,</span> <span class="identifier">dt</span>
                    <span class="special">)</span></code>
                  </li>
</ul></div>
            </li>
<li class="listitem">
              This stepper works with all steppers fulfilling the Stepper concept,
              the ControlledStepper concept or the DenseOutputStepper concept.
            </li>
<li class="listitem">
              This stepper updates the value of <code class="computeroutput"><span class="identifier">state</span></code>.
              The value of <code class="computeroutput"><span class="identifier">state</span></code>
              is the current state of the ODE during the iteration.
            </li>
</ul></div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2015 Karsten Ahnert and Mario Mulansky<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="integrate_functions.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="state_types__algebras_and_operations.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
